home *** CD-ROM | disk | FTP | other *** search
- POPPAR(3I) Last changed: 1-6-98
-
-
- NNAAMMEE
- __ppooppppaarr, PPOOPPPPAARR - Computes bit population parity
-
- SSYYNNOOPPSSIISS
- C/C++:
-
- ##iinncclluuddee <<iinnttrriinnssiiccss..hh>>
- iinntt __ppooppppaarr ((lloonngg _i));;
-
- Fortran:
-
- PPOOPPPPAARR (([II==]_i))
-
- IIMMPPLLEEMMEENNTTAATTIIOONN
- C/C++: UNICOS and UNICOS/mk systems
-
- Fortran: UNICOS, UNICOS/mk, and IRIX systems
-
- SSTTAANNDDAARRDDSS
- C/C++: Cray Research extension
-
- Fortran: CF90 and MIPSpro 7 Fortran 90 compiler extension to Fortran
- 90
-
- CC//CC++++ DDEESSCCRRIIPPTTIIOONN
- The __ppooppppaarr function returns 0 if the argument _i has an even number of
- bits that are set to 1. This is the parity of the population count
- for argument _i.
-
- FFOORRTTRRAANN DDEESSCCRRIIPPTTIIOONN
- This intrinsic function computes the bit population parity and returns
- an integer value. It accepts the following argument:
-
- _i A Boolean, integer, real, or Cray pointer value. On IRIX
- systems, _i cannot be declared as RREEAALL((KKIINNDD==1166)).
-
- PPOOPPPPAARR is an elemental function. The name of this intrinsic cannot be
- passed as an argument.
-
- NNOOTTEESS
- The bit representation of the logical data type is not consistent
- among Cray Research systems. For further details, see your compiler's
- reference manuals.
-
- CC//CC++++ NNOOTTEESS
- Because __ppooppppaarr is an intrinsic function, no externally visible
- library function is available for it. The compiler generates inline
- code to produce the result.
-
- FFOORRTTRRAANN RREETTUURRNN VVAALLUUEESS
- In Fortran, PPOOPPPPAARR returns the value 0 if an even number of bits in _i
- are set. It returns the value 1 if an odd number of bits are set in
- _i.
-
- The return value is of type integer.
-
- EEXXAAMMPPLLEESS
- The following section of Fortran code shows the PPOOPPPPAARR function used
- with an argument of type integer. The bit pattern of the argument and
- the value of the result are also given. For simplicity, a 16-bit
- object is used.
-
- INTEGER I1, I2
- ...
- I2 = POPPAR(I1)
-
-
- ---------------------------------------------------------------
- | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 1 | 1 | 1 | 0 | 0 | 1 | 0 |
- ---------------------------------------------------------------
- I1
-
- The PPOOPPPPAARR function returns the value 0 to the integer variable II22.
-
- SSEEEE AALLSSOO
- A complete list of C/C++ intrinsic functions available on Cray
- Research systems is in the _C_r_a_y _C/_C++ _R_e_f_e_r_e_n_c_e _M_a_n_u_a_l, publication SR
- -2179.
-
- _I_n_t_r_i_n_s_i_c _P_r_o_c_e_d_u_r_e_s _R_e_f_e_r_e_n_c_e _M_a_n_u_a_l, publication SR-2138, for the
- printed version of this man page.
-
-